home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
AECUR100.ARJ
/
CMEMSRCH.C
< prev
next >
Wrap
Text File
|
1990-03-08
|
591b
|
30 lines
/**********************************************************************
*
* cmemsrch.c
*
* copyright (c) 1988,89,90 J. Alan Eldridge
*
* memsrchw() in C
*
* search an array of 2-byte values
*
*********************************************************************/
void *
memsrchw(
void *buf,
void *valp,
int wcnt)
{
short wordval = *(short *)valp;
short *wordptr = buf;
while (wcnt-- > 0) {
if (*wordptr == wordval)
return wordptr;
wordptr++;
}
return NULL;
}